object AssignmentBitOpDemo {
  def main(args: Array[String]): Unit = {
    var classTotal: Int = 0
    classTotal += 480
    classTotal += 490
    classTotal += 470
    println(s"班级总分为：$classTotal")

    val excellent: Int = 10
    val good: Int = 1

    val combinedMark: Int = excellent | good
    println(s"组合标记（二进制）：${Integer.toBinaryString(combinedMark)}")

    val hasExcellent: Boolean = (combinedMark & excellent) != 0
    println(s"是否包含优秀标记：$hasExcellent")
  }
}
//第七周（动手练习3）